package com.lqy.service;

import com.lqy.mapper.DriverLqyMapper;
import com.lqy.service.Inter.DriverService;
import com.zzg.entity.Driver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author lqy
 * @version 1.0.0
 * @ClassName：DriverServiceImpl
 * @Description: 车辆管理服务层实现类
 * @date 2021/6/21
 **/
@Service
public class DriverServiceImpl implements DriverService {

    /**
     * dao 车辆管理的dao层
     */
    @Autowired
    private DriverLqyMapper driverMapper;

    @Override
    public List<Driver> getDriver() {
        return driverMapper.getDriver();
    }

    @Override
    public List<Driver> getCouByPage(int page, int limit) {
        return driverMapper.getCouByPage(page,limit);
    }

    @Override
    public int insertDriver(Driver driver) {
        return driverMapper.insertDriver(driver);
    }

    @Override
    public int updateDriver(Driver driver) {
        return driverMapper.updateDriver(driver);
    }

    @Override
    public int deleteDriver(String driverId) {
        return driverMapper.deleteDriver(driverId);
    }

    @Override
    public Driver getUserById(String driverId) {
        return driverMapper.getUserById(driverId);
    }

    @Override
    public List<Driver> getDrivers(Driver driver) {
        return driverMapper.getDrivers(driver);
    }
}
